#!/usr/bin/env python
# -*- encoding: utf-8 -*-
'''
@File    :   NRC22_Phy_test.py
@Time    :   2022/09/02 13:31:28
@Author  :   YangLiang
@Version :   1.0
@Contact :   yangliang@chengtech.com
@License :   (C)Copyright 2022-2025
@Desc    :   None
'''

# here put the import lib
from pickle import TRUE
from pytest_assume.plugin import assume

import pytest
import logging
import time
import requests
from sympy import I
# from sympy import assuming
from commDriver.TS_CAN import *
import allure
import sys
from collections.abc import Iterable

from sqlalchemy import false
sys.dont_write_bytecode = True

ECUReset  = [  ([0x11, 0x01],[0x7F, 0x11, 0x22],[0x51]),
               ([0x11, 0x03],[0x7F, 0x11, 0x22],[0x51]),
          ]

class Test_SID0x11_NRC22_Phy(object):

    '''SID11 NRC22 test case 3E 00'''

    ids = ids = ["Request {}".format(binascii.b2a_hex(bytearray(req), ' '))for req,resp,resp2 in ECUReset]
    @allure.story('ECU NRC 22 Test')
    @allure.title('Test NRC22 of 0x11 Service Undervoltage in default session with Physical Address')
    @allure.description('Test NRC22 of 0x11 Service Undervoltage in default session with Physical Address')
    @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
    @pytest.mark.parametrize('req,resp,resp2', ECUReset, ids=ids)
    def test_SID11_UnderVoltage_Default_Phy(self, action, Driver,req,resp,resp2):
        iStep = 1
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 1, iStep, False)
        iStep = Driver['CAN'].SetVolt(Driver, 6, 1, iStep)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 0, iStep, False)
        time.sleep(1)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 0, iStep, False)
        time.sleep(1)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp, 0, iStep, False)

        iStep = Driver['CAN'].SetVolt(Driver, 12, 1, iStep)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp2, 0, iStep, False)

    
    ids = ids = ["Request {}".format(binascii.b2a_hex(bytearray(req), ' '))for req,resp,resp2 in ECUReset]
    @allure.story('ECU NRC 22 Test')
    @allure.title('Test NRC22 of 0x11 Service Undervoltage in programming session with Physical Address')
    @allure.description('Test NRC22 of 0x11 Service Undervoltage in programming session with Physical Address')
    @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
    @pytest.mark.parametrize('req,resp,resp2', ECUReset, ids=ids)
    def test_SID11_UnderVoltage_Programming_Phy(self, action, Driver,req,resp,resp2):
        iStep = 1
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 2, iStep, False)
        iStep = Driver['CAN'].SetVolt(Driver, 6, 1, iStep)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 0, iStep, False)
        time.sleep(1)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 0, iStep, False)
        time.sleep(1)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp, 0, iStep, False)
        iStep = Driver['CAN'].SetVolt(Driver, 12, 1, iStep)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp2, 0, iStep, False)

    ids = ids = ["Request {}".format(binascii.b2a_hex(bytearray(req), ' '))for req,resp,resp2 in ECUReset]
    @allure.story('ECU NRC 22 Test')
    @allure.title('Test NRC22 of 0x11 Service Undervoltage in extended session with Physical Address')
    @allure.description('Test NRC22 of 0x11 Service Undervoltage in extended session with Physical Address')
    @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
    @pytest.mark.parametrize('req,resp,resp2', ECUReset, ids=ids)
    def test_SID11_UnderVoltage_Extended_Phy(self, action, Driver,req,resp,resp2):
        iStep = 1
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 3, iStep, False)
        iStep = Driver['CAN'].SetVolt(Driver, 6, 1, iStep)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 0, iStep, False)
        time.sleep(1)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 0, iStep, False)
        time.sleep(1)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp, 0, iStep, False)
        iStep = Driver['CAN'].SetVolt(Driver, 12, 1, iStep)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp2, 0, iStep, False)

    ids = ids = ["Request {}".format(binascii.b2a_hex(bytearray(req), ' '))for req,resp,resp2 in ECUReset]
    @allure.title('Test NRC22 of 0x11 Service OverVoltage in default session with Physical Address')
    @allure.description('Test 0x11 Service OverVoltage confition response NRC22 in default session with physical addressing')
    @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
    @pytest.mark.parametrize('req,resp,resp2', ECUReset, ids=ids)
    def test_SID11_OverVoltage_Default_Phy(self, action, Driver,req,resp,resp2):
        iStep = 1
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 1, iStep, False)
        iStep = Driver['CAN'].SetVolt(Driver, 18.5, 1, iStep)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 0, iStep, False)
        time.sleep(1)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 0, iStep, False)
        time.sleep(1)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp, 0, iStep, False)
        iStep = Driver['CAN'].SetVolt(Driver, 12, 1, iStep)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp2, 0, iStep, False)

    ids = ids = ["Request {}".format(binascii.b2a_hex(bytearray(req), ' '))for req,resp,resp2 in ECUReset]
    @allure.title('Test NRC22 of 0x11 Service OverVoltage in programming session with Physical Address')
    @allure.description('Test 0x11 Service OverVoltage confition response NRC22 in programming session with physical addressing')
    @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
    @pytest.mark.parametrize('req,resp,resp2', ECUReset, ids=ids)
    def test_SID11_OverVoltage_Programming_Phy(self, action, Driver,req,resp,resp2):
        iStep = 1
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 2, iStep, False)
        iStep = Driver['CAN'].SetVolt(Driver, 18.5, 1, iStep)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 0, iStep, False)
        time.sleep(1)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 0, iStep, False)
        time.sleep(1)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp, 0, iStep, False)
        iStep = Driver['CAN'].SetVolt(Driver, 12, 1, iStep)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp2, 0, iStep, False)

    ids = ids = ["Request {}".format(binascii.b2a_hex(bytearray(req), ' '))for req,resp,resp2 in ECUReset]
    @allure.title('Test NRC22 of 0x11 Service OverVoltage in extended session with Physical Address')
    @allure.description('Test 0x11 Service OverVoltage confition response NRC22 in extended session with physical addressing')
    @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
    @pytest.mark.parametrize('req,resp,resp2', ECUReset, ids=ids)
    def test_SID11_OverVoltage_Extended_Phy(self, action, Driver,req,resp,resp2):
        iStep = 1
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 3, iStep, False)
        iStep = Driver['CAN'].SetVolt(Driver, 18.5, 1, iStep)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 0, iStep, False)
        time.sleep(1)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 0, iStep, False)
        time.sleep(1)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp, 0, iStep, False)
        iStep = Driver['CAN'].SetVolt(Driver, 12, 1, iStep)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp2, 0, iStep, False)

    ids = ids = ["Request {}".format(binascii.b2a_hex(bytearray(req), ' '))for req,resp,resp2 in ECUReset]
    @allure.title('Test NRC22 of 0x11 Service Vspeed over 3kph in default session with Physical Address')
    @allure.description('Test 0x1101 Service Vspeed over 3kph confition response NRC22 in default session with physical addressing')
    @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
    @pytest.mark.parametrize('req,resp,resp2', ECUReset, ids=ids)
    def test_SID11_OverVspeed_Default_Phy(self, action, Driver,req,resp,resp2):
          iStep = 1
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 1, iStep, False)
          #设置车速大于3KM/H
          iStep = Driver['CAN'].setSignalValue('abs_sts_run1', 'abs_pm_veh_spd',80,iStep)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 0, iStep, False)

          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp, 0, iStep, False)

          iStep = Driver['CAN'].setSignalValue('abs_sts_run1', 'abs_pm_veh_spd',0,iStep)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp2, 0, iStep, False)

    ids = ids = ["Request {}".format(binascii.b2a_hex(bytearray(req), ' '))for req,resp,resp2 in ECUReset]
    @allure.title('Test NRC22 of 0x11 Service Vspeed over 3kph in Programming session with Physical Address')
    @allure.description('Test 0x1101 Service Vspeed over 3kph confition response NRC22 in Programming session with physical addressing')
    @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
    @pytest.mark.parametrize('req,resp,resp2', ECUReset, ids=ids)
    def test_SID11_OverVspeed_Programming_Phy(self, action, Driver,req,resp,resp2):
          iStep = 1
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 2, iStep, False)
          #设置车速大于3KM/H
          iStep = Driver['CAN'].setSignalValue('abs_sts_run1', 'abs_pm_veh_spd',80,iStep)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 0, iStep, False)

          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp, 0, iStep, False)

          iStep = Driver['CAN'].setSignalValue('abs_sts_run1', 'abs_pm_veh_spd',0,iStep)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp2, 0, iStep, False)


    ids = ids = ["Request {}".format(binascii.b2a_hex(bytearray(req), ' '))for req,resp,resp2 in ECUReset]
    @allure.title('Test NRC22 of 0x11 Service Vspeed over 3kph in extended session with Physical Address')
    @allure.description('Test 0x1101 Service Vspeed over 3kph confition response NRC22 in extended session with physical addressing')
    @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
    @pytest.mark.parametrize('req,resp,resp2', ECUReset, ids=ids)
    def test_SID11_OverVspeed_Extended_Phy(self, action, Driver,req,resp,resp2):
        iStep = 1
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 3, iStep, False)
        #设置车速大于3KM/H
        iStep = Driver['CAN'].setSignalValue('abs_sts_run1', 'abs_pm_veh_spd',80,iStep)
        time.sleep(1)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 0, iStep, False)
        time.sleep(1)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 0, iStep, False)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp, 0, iStep, False)
        #设置车速
        iStep = Driver['CAN'].setSignalValue('abs_sts_run1', 'abs_pm_veh_spd',0,iStep)
        time.sleep(0.5)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp2, 0, iStep, False)


    '''SID11 NRC22 test case 3E 80'''

    ids = ids = ["Request {}".format(binascii.b2a_hex(bytearray(req), ' '))for req,resp,resp2 in ECUReset]
    @allure.story('ECU NRC 22 Test')
    @allure.title('Test NRC22 of 0x11 Service Undervoltage in default session with Physical Address')
    @allure.description('Test NRC22 of 0x11 Service Undervoltage in default session with Physical Address')
    @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
    @pytest.mark.parametrize('req,resp,resp2', ECUReset, ids=ids)
    def test_SID11_UnderVoltage_Default_Send3E80_Phy(self, action, Driver,req,resp,resp2):
        iStep = 1
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 1, iStep, False)
        iStep = Driver['CAN'].SetVolt(Driver, 6, 1, iStep)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 0, iStep, False)
        time.sleep(1)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 0, iStep, False)
        time.sleep(1)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp, 0, iStep, False)

        iStep = Driver['CAN'].SetVolt(Driver, 12, 1, iStep)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp2, 0, iStep, False)

    
    ids = ids = ["Request {}".format(binascii.b2a_hex(bytearray(req), ' '))for req,resp,resp2 in ECUReset]
    @allure.story('ECU NRC 22 Test')
    @allure.title('Test NRC22 of 0x11 Service Undervoltage in programming session with Physical Address')
    @allure.description('Test NRC22 of 0x11 Service Undervoltage in programming session with Physical Address')
    @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
    @pytest.mark.parametrize('req,resp,resp2', ECUReset, ids=ids)
    def test_SID11_UnderVoltage_Programming_Send3E80_Phy(self, action, Driver,req,resp,resp2):
        iStep = 1
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 2, iStep, False)
        iStep = Driver['CAN'].SetVolt(Driver, 6, 1, iStep)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 0, iStep, False)
        time.sleep(1)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 0, iStep, False)
        time.sleep(1)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp, 0, iStep, False)
        iStep = Driver['CAN'].SetVolt(Driver, 12, 1, iStep)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp2, 0, iStep, False)

    ids = ids = ["Request {}".format(binascii.b2a_hex(bytearray(req), ' '))for req,resp,resp2 in ECUReset]
    @allure.story('ECU NRC 22 Test')
    @allure.title('Test NRC22 of 0x11 Service Undervoltage in extended session with Physical Address')
    @allure.description('Test NRC22 of 0x11 Service Undervoltage in extended session with Physical Address')
    @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
    @pytest.mark.parametrize('req,resp,resp2', ECUReset, ids=ids)
    def test_SID11_UnderVoltage_Extended_Send3E80_Phy(self, action, Driver,req,resp,resp2):
        iStep = 1
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 3, iStep, False)
        iStep = Driver['CAN'].SetVolt(Driver, 6, 1, iStep)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 0, iStep, False)
        time.sleep(1)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 0, iStep, False)
        time.sleep(1)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp, 0, iStep, False)
        iStep = Driver['CAN'].SetVolt(Driver, 12, 1, iStep)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp2, 0, iStep, False)

    ids = ids = ["Request {}".format(binascii.b2a_hex(bytearray(req), ' '))for req,resp,resp2 in ECUReset]
    @allure.title('Test NRC22 of 0x11 Service OverVoltage in default session with Physical Address')
    @allure.description('Test 0x11 Service OverVoltage confition response NRC22 in default session with physical addressing')
    @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
    @pytest.mark.parametrize('req,resp,resp2', ECUReset, ids=ids)
    def test_SID11_OverVoltage_Default_Send3E80_Phy(self, action, Driver,req,resp,resp2):
        iStep = 1
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 1, iStep, False)
        iStep = Driver['CAN'].SetVolt(Driver, 18.5, 1, iStep)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 0, iStep, False)
        time.sleep(1)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 0, iStep, False)
        time.sleep(1)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp, 0, iStep, False)
        iStep = Driver['CAN'].SetVolt(Driver, 12, 1, iStep)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp2, 0, iStep, False)

    ids = ids = ["Request {}".format(binascii.b2a_hex(bytearray(req), ' '))for req,resp,resp2 in ECUReset]
    @allure.title('Test NRC22 of 0x11 Service OverVoltage in programming session with Physical Address')
    @allure.description('Test 0x11 Service OverVoltage confition response NRC22 in programming session with physical addressing')
    @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
    @pytest.mark.parametrize('req,resp,resp2', ECUReset, ids=ids)
    def test_SID11_OverVoltage_Programming_Send3E80_Phy(self, action, Driver,req,resp,resp2):
        iStep = 1
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 2, iStep, False)
        iStep = Driver['CAN'].SetVolt(Driver, 18.5, 1, iStep)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 0, iStep, False)
        time.sleep(1)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 0, iStep, False)
        time.sleep(1)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp, 0, iStep, False)
        iStep = Driver['CAN'].SetVolt(Driver, 12, 1, iStep)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp2, 0, iStep, False)

    ids = ids = ["Request {}".format(binascii.b2a_hex(bytearray(req), ' '))for req,resp,resp2 in ECUReset]
    @allure.title('Test NRC22 of 0x11 Service OverVoltage in extended session with Physical Address')
    @allure.description('Test 0x11 Service OverVoltage confition response NRC22 in extended session with physical addressing')
    @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
    @pytest.mark.parametrize('req,resp,resp2', ECUReset, ids=ids)
    def test_SID11_OverVoltage_Extended_Send3E80_Phy(self, action, Driver,req,resp,resp2):
        iStep = 1
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 3, iStep, False)
        iStep = Driver['CAN'].SetVolt(Driver, 18.5, 1, iStep)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 0, iStep, False)
        time.sleep(1)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 0, iStep, False)
        time.sleep(1)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp, 0, iStep, False)
        iStep = Driver['CAN'].SetVolt(Driver, 12, 1, iStep)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp2, 0, iStep, False)

    ids = ids = ["Request {}".format(binascii.b2a_hex(bytearray(req), ' '))for req,resp,resp2 in ECUReset]
    @allure.title('Test NRC22 of 0x11 Service Vspeed over 3kph in default session with Physical Address')
    @allure.description('Test 0x1101 Service Vspeed over 3kph confition response NRC22 in default session with physical addressing')
    @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
    @pytest.mark.parametrize('req,resp,resp2', ECUReset, ids=ids)
    def test_SID11_OverVspeed_Default_Send3E80_Phy(self, action, Driver,req,resp,resp2):
          iStep = 1
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 1, iStep, False)
          #设置车速大于3KM/H
          iStep = Driver['CAN'].setSignalValue('abs_sts_run1', 'abs_pm_veh_spd',80,iStep)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 0, iStep, False)

          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp, 0, iStep, False)

          iStep = Driver['CAN'].setSignalValue('abs_sts_run1', 'abs_pm_veh_spd',0,iStep)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp2, 0, iStep, False)

    ids = ids = ["Request {}".format(binascii.b2a_hex(bytearray(req), ' '))for req,resp,resp2 in ECUReset]
    @allure.title('Test NRC22 of 0x11 Service Vspeed over 3kph in Programming session with Physical Address')
    @allure.description('Test 0x1101 Service Vspeed over 3kph confition response NRC22 in Programming session with physical addressing')
    @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
    @pytest.mark.parametrize('req,resp,resp2', ECUReset, ids=ids)
    def test_SID11_OverVspeed_Programming_Send3E80_Phy(self, action, Driver,req,resp,resp2):
          iStep = 1
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 2, iStep, False)
          #设置车速大于3KM/H
          iStep = Driver['CAN'].setSignalValue('abs_sts_run1', 'abs_pm_veh_spd',80,iStep)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 0, iStep, False)

          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp, 0, iStep, False)

          iStep = Driver['CAN'].setSignalValue('abs_sts_run1', 'abs_pm_veh_spd',0,iStep)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp2, 0, iStep, False)


    ids = ids = ["Request {}".format(binascii.b2a_hex(bytearray(req), ' '))for req,resp,resp2 in ECUReset]
    @allure.title('Test NRC22 of 0x11 Service Vspeed over 3kph in extended session with Physical Address')
    @allure.description('Test 0x1101 Service Vspeed over 3kph confition response NRC22 in extended session with physical addressing')
    @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
    @pytest.mark.parametrize('req,resp,resp2', ECUReset, ids=ids)
    def test_SID11_OverVspeed_Extended_Send3E80_Phy(self, action, Driver,req,resp,resp2):
        iStep = 1
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 3, iStep, False)
        #设置车速大于3KM/H
        iStep = Driver['CAN'].setSignalValue('abs_sts_run1', 'abs_pm_veh_spd',80,iStep)
        time.sleep(1)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 0, iStep, False)
        time.sleep(1)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 0, iStep, False)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp, 0, iStep, False)
        #设置车速
        iStep = Driver['CAN'].setSignalValue('abs_sts_run1', 'abs_pm_veh_spd',0,iStep)
        time.sleep(0.5)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp2, 0, iStep, False)



class Test_SID0x11_NRC22_Fun(object):

    '''SID11 NRC22 test case 3E 00'''

    ids = ids = ["Request {}".format(binascii.b2a_hex(bytearray(req), ' '))for req,resp,resp2 in ECUReset]
    @allure.story('ECU NRC 22 Test')
    @allure.title('Test NRC22 of 0x11 Service Undervoltage in default session with  Functional Address')
    @allure.description('Test NRC22 of 0x11 Service Undervoltage in default session with  Functional Address')
    @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
    @pytest.mark.parametrize('req,resp,resp2', ECUReset, ids=ids)
    def test_SID11_UnderVoltage_Default_Fun(self, action, Driver,req,resp,resp2):
        iStep = 1
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 1, iStep, False)
        iStep = Driver['CAN'].SetVolt(Driver, 6, 1, iStep)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 0, iStep, False)
        time.sleep(1)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 0, iStep, False)
        time.sleep(1)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp, 0, iStep, False, 'UDSFun')

        iStep = Driver['CAN'].SetVolt(Driver, 12, 1, iStep)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp2, 0, iStep, False, 'UDSFun')

    
    ids = ids = ["Request {}".format(binascii.b2a_hex(bytearray(req), ' '))for req,resp,resp2 in ECUReset]
    @allure.story('ECU NRC 22 Test')
    @allure.title('Test NRC22 of 0x11 Service Undervoltage in programming session with  Functional Address')
    @allure.description('Test NRC22 of 0x11 Service Undervoltage in programming session with  Functional Address')
    @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
    @pytest.mark.parametrize('req,resp,resp2', ECUReset, ids=ids)
    def test_SID11_UnderVoltage_Programming_Fun(self, action, Driver,req,resp,resp2):
        iStep = 1
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 2, iStep, False)
        iStep = Driver['CAN'].SetVolt(Driver, 6, 1, iStep)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 0, iStep, False)
        time.sleep(1)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 0, iStep, False)
        time.sleep(1)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp, 0, iStep, False, 'UDSFun')
        iStep = Driver['CAN'].SetVolt(Driver, 12, 1, iStep)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp2, 0, iStep, False, 'UDSFun')

    ids = ids = ["Request {}".format(binascii.b2a_hex(bytearray(req), ' '))for req,resp,resp2 in ECUReset]
    @allure.story('ECU NRC 22 Test')
    @allure.title('Test NRC22 of 0x11 Service Undervoltage in extended session with  Functional Address')
    @allure.description('Test NRC22 of 0x11 Service Undervoltage in extended session with  Functional Address')
    @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
    @pytest.mark.parametrize('req,resp,resp2', ECUReset, ids=ids)
    def test_SID11_UnderVoltage_Extended_Fun(self, action, Driver,req,resp,resp2):
        iStep = 1
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 3, iStep, False)
        iStep = Driver['CAN'].SetVolt(Driver, 6, 1, iStep)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 0, iStep, False)
        time.sleep(1)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 0, iStep, False)
        time.sleep(1)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp, 0, iStep, False, 'UDSFun')
        iStep = Driver['CAN'].SetVolt(Driver, 12, 1, iStep)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp2, 0, iStep, False, 'UDSFun')

    ids = ids = ["Request {}".format(binascii.b2a_hex(bytearray(req), ' '))for req,resp,resp2 in ECUReset]
    @allure.title('Test NRC22 of 0x11 Service OverVoltage in default session with  Functional Address')
    @allure.description('Test 0x11 Service OverVoltage confition response NRC22 in default session with  Functional addressing')
    @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
    @pytest.mark.parametrize('req,resp,resp2', ECUReset, ids=ids)
    def test_SID11_OverVoltage_Default_Fun(self, action, Driver,req,resp,resp2):
        iStep = 1
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 1, iStep, False)
        iStep = Driver['CAN'].SetVolt(Driver, 18.5, 1, iStep)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 0, iStep, False)
        time.sleep(1)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 0, iStep, False)
        time.sleep(1)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp, 0, iStep, False, 'UDSFun')
        iStep = Driver['CAN'].SetVolt(Driver, 12, 1, iStep)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp2, 0, iStep, False, 'UDSFun')

    ids = ids = ["Request {}".format(binascii.b2a_hex(bytearray(req), ' '))for req,resp,resp2 in ECUReset]
    @allure.title('Test NRC22 of 0x11 Service OverVoltage in programming session with  Functional Address')
    @allure.description('Test 0x11 Service OverVoltage confition response NRC22 in programming session with  Functional addressing')
    @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
    @pytest.mark.parametrize('req,resp,resp2', ECUReset, ids=ids)
    def test_SID11_OverVoltage_Programming_Fun(self, action, Driver,req,resp,resp2):
        iStep = 1
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 2, iStep, False)
        iStep = Driver['CAN'].SetVolt(Driver, 18.5, 1, iStep)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 0, iStep, False)
        time.sleep(1)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 0, iStep, False)
        time.sleep(1)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp, 0, iStep, False, 'UDSFun')
        iStep = Driver['CAN'].SetVolt(Driver, 12, 1, iStep)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp2, 0, iStep, False, 'UDSFun')

    ids = ids = ["Request {}".format(binascii.b2a_hex(bytearray(req), ' '))for req,resp,resp2 in ECUReset]
    @allure.title('Test NRC22 of 0x11 Service OverVoltage in extended session with  Functional Address')
    @allure.description('Test 0x11 Service OverVoltage confition response NRC22 in extended session with  Functional addressing')
    @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
    @pytest.mark.parametrize('req,resp,resp2', ECUReset, ids=ids)
    def test_SID11_OverVoltage_Extended_Fun(self, action, Driver,req,resp,resp2):
        iStep = 1
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 3, iStep, False)
        iStep = Driver['CAN'].SetVolt(Driver, 18.5, 1, iStep)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 0, iStep, False)
        time.sleep(1)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 0, iStep, False)
        time.sleep(1)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp, 0, iStep, False, 'UDSFun')
        iStep = Driver['CAN'].SetVolt(Driver, 12, 1, iStep)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp2, 0, iStep, False, 'UDSFun')

    ids = ids = ["Request {}".format(binascii.b2a_hex(bytearray(req), ' '))for req,resp,resp2 in ECUReset]
    @allure.title('Test NRC22 of 0x11 Service Vspeed over 3kph in default session with  Functional Address')
    @allure.description('Test 0x1101 Service Vspeed over 3kph confition response NRC22 in default session with  Functional addressing')
    @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
    @pytest.mark.parametrize('req,resp,resp2', ECUReset, ids=ids)
    def test_SID11_OverVspeed_Default_Fun(self, action, Driver,req,resp,resp2):
          iStep = 1
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 1, iStep, False)
          #设置车速大于3KM/H
          iStep = Driver['CAN'].setSignalValue('abs_sts_run1', 'abs_pm_veh_spd',80,iStep)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 0, iStep, False)

          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp, 0, iStep, False, 'UDSFun')

          iStep = Driver['CAN'].setSignalValue('abs_sts_run1', 'abs_pm_veh_spd',0,iStep)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp2, 0, iStep, False, 'UDSFun')

    ids = ids = ["Request {}".format(binascii.b2a_hex(bytearray(req), ' '))for req,resp,resp2 in ECUReset]
    @allure.title('Test NRC22 of 0x11 Service Vspeed over 3kph in Programming session with  Functional Address')
    @allure.description('Test 0x1101 Service Vspeed over 3kph confition response NRC22 in Programming session with  Functional addressing')
    @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
    @pytest.mark.parametrize('req,resp,resp2', ECUReset, ids=ids)
    def test_SID11_OverVspeed_Programming_Fun(self, action, Driver,req,resp,resp2):
          iStep = 1
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 2, iStep, False)
          #设置车速大于3KM/H
          iStep = Driver['CAN'].setSignalValue('abs_sts_run1', 'abs_pm_veh_spd',80,iStep)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 0, iStep, False)

          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp, 0, iStep, False, 'UDSFun')

          iStep = Driver['CAN'].setSignalValue('abs_sts_run1', 'abs_pm_veh_spd',0,iStep)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp2, 0, iStep, False, 'UDSFun')


    ids = ids = ["Request {}".format(binascii.b2a_hex(bytearray(req), ' '))for req,resp,resp2 in ECUReset]
    @allure.title('Test NRC22 of 0x11 Service Vspeed over 3kph in extended session with  Functional Address')
    @allure.description('Test 0x1101 Service Vspeed over 3kph confition response NRC22 in extended session with  Functional addressing')
    @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
    @pytest.mark.parametrize('req,resp,resp2', ECUReset, ids=ids)
    def test_SID11_OverVspeed_Extended_Fun(self, action, Driver,req,resp,resp2):
        iStep = 1
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 3, iStep, False)
        #设置车速大于3KM/H
        iStep = Driver['CAN'].setSignalValue('abs_sts_run1', 'abs_pm_veh_spd',80,iStep)
        time.sleep(1)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 0, iStep, False)
        time.sleep(1)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 0, iStep, False)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp, 0, iStep, False, 'UDSFun')
        #设置车速
        iStep = Driver['CAN'].setSignalValue('abs_sts_run1', 'abs_pm_veh_spd',0,iStep)
        time.sleep(0.5)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp2, 0, iStep, False, 'UDSFun')


    '''SID11 NRC22 test case 3E 80'''

    ids = ids = ["Request {}".format(binascii.b2a_hex(bytearray(req), ' '))for req,resp,resp2 in ECUReset]
    @allure.story('ECU NRC 22 Test')
    @allure.title('Test NRC22 of 0x11 Service Undervoltage in default session with  Functional Address')
    @allure.description('Test NRC22 of 0x11 Service Undervoltage in default session with  Functional Address')
    @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
    @pytest.mark.parametrize('req,resp,resp2', ECUReset, ids=ids)
    def test_SID11_UnderVoltage_Default_Send3E80_Fun(self, action, Driver,req,resp,resp2):
        iStep = 1
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 1, iStep, False)
        iStep = Driver['CAN'].SetVolt(Driver, 6, 1, iStep)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 0, iStep, False)
        time.sleep(1)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 0, iStep, False)
        time.sleep(1)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp, 0, iStep, False, 'UDSFun')

        iStep = Driver['CAN'].SetVolt(Driver, 12, 1, iStep)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp2, 0, iStep, False, 'UDSFun')

    
    ids = ids = ["Request {}".format(binascii.b2a_hex(bytearray(req), ' '))for req,resp,resp2 in ECUReset]
    @allure.story('ECU NRC 22 Test')
    @allure.title('Test NRC22 of 0x11 Service Undervoltage in programming session with  Functional Address')
    @allure.description('Test NRC22 of 0x11 Service Undervoltage in programming session with  Functional Address')
    @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
    @pytest.mark.parametrize('req,resp,resp2', ECUReset, ids=ids)
    def test_SID11_UnderVoltage_Programming_Send3E80_Fun(self, action, Driver,req,resp,resp2):
        iStep = 1
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 2, iStep, False)
        iStep = Driver['CAN'].SetVolt(Driver, 6, 1, iStep)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 0, iStep, False)
        time.sleep(1)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 0, iStep, False)
        time.sleep(1)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp, 0, iStep, False, 'UDSFun')
        iStep = Driver['CAN'].SetVolt(Driver, 12, 1, iStep)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp2, 0, iStep, False, 'UDSFun')

    ids = ids = ["Request {}".format(binascii.b2a_hex(bytearray(req), ' '))for req,resp,resp2 in ECUReset]
    @allure.story('ECU NRC 22 Test')
    @allure.title('Test NRC22 of 0x11 Service Undervoltage in extended session with  Functional Address')
    @allure.description('Test NRC22 of 0x11 Service Undervoltage in extended session with  Functional Address')
    @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
    @pytest.mark.parametrize('req,resp,resp2', ECUReset, ids=ids)
    def test_SID11_UnderVoltage_Extended_Send3E80_Fun(self, action, Driver,req,resp,resp2):
        iStep = 1
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 3, iStep, False)
        iStep = Driver['CAN'].SetVolt(Driver, 6, 1, iStep)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 0, iStep, False)
        time.sleep(1)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 0, iStep, False)
        time.sleep(1)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp, 0, iStep, False, 'UDSFun')
        iStep = Driver['CAN'].SetVolt(Driver, 12, 1, iStep)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp2, 0, iStep, False, 'UDSFun')

    ids = ids = ["Request {}".format(binascii.b2a_hex(bytearray(req), ' '))for req,resp,resp2 in ECUReset]
    @allure.title('Test NRC22 of 0x11 Service OverVoltage in default session with  Functional Address')
    @allure.description('Test 0x11 Service OverVoltage confition response NRC22 in default session with  Functional addressing')
    @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
    @pytest.mark.parametrize('req,resp,resp2', ECUReset, ids=ids)
    def test_SID11_OverVoltage_Default_Send3E80_Fun(self, action, Driver,req,resp,resp2):
        iStep = 1
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 1, iStep, False)
        iStep = Driver['CAN'].SetVolt(Driver, 18.5, 1, iStep)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 0, iStep, False)
        time.sleep(1)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 0, iStep, False)
        time.sleep(1)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp, 0, iStep, False, 'UDSFun')
        iStep = Driver['CAN'].SetVolt(Driver, 12, 1, iStep)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp2, 0, iStep, False, 'UDSFun')

    ids = ids = ["Request {}".format(binascii.b2a_hex(bytearray(req), ' '))for req,resp,resp2 in ECUReset]
    @allure.title('Test NRC22 of 0x11 Service OverVoltage in programming session with  Functional Address')
    @allure.description('Test 0x11 Service OverVoltage confition response NRC22 in programming session with  Functional addressing')
    @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
    @pytest.mark.parametrize('req,resp,resp2', ECUReset, ids=ids)
    def test_SID11_OverVoltage_Programming_Send3E80_Fun(self, action, Driver,req,resp,resp2):
        iStep = 1
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 2, iStep, False)
        iStep = Driver['CAN'].SetVolt(Driver, 18.5, 1, iStep)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 0, iStep, False)
        time.sleep(1)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 0, iStep, False)
        time.sleep(1)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp, 0, iStep, False, 'UDSFun')
        iStep = Driver['CAN'].SetVolt(Driver, 12, 1, iStep)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp2, 0, iStep, False, 'UDSFun')

    ids = ids = ["Request {}".format(binascii.b2a_hex(bytearray(req), ' '))for req,resp,resp2 in ECUReset]
    @allure.title('Test NRC22 of 0x11 Service OverVoltage in extended session with  Functional Address')
    @allure.description('Test 0x11 Service OverVoltage confition response NRC22 in extended session with  Functional addressing')
    @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
    @pytest.mark.parametrize('req,resp,resp2', ECUReset, ids=ids)
    def test_SID11_OverVoltage_Extended_Send3E80_Fun(self, action, Driver,req,resp,resp2):
        iStep = 1
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 3, iStep, False)
        iStep = Driver['CAN'].SetVolt(Driver, 18.5, 1, iStep)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 0, iStep, False)
        time.sleep(1)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 0, iStep, False)
        time.sleep(1)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp, 0, iStep, False, 'UDSFun')
        iStep = Driver['CAN'].SetVolt(Driver, 12, 1, iStep)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp2, 0, iStep, False, 'UDSFun')

    ids = ids = ["Request {}".format(binascii.b2a_hex(bytearray(req), ' '))for req,resp,resp2 in ECUReset]
    @allure.title('Test NRC22 of 0x11 Service Vspeed over 3kph in default session with  Functional Address')
    @allure.description('Test 0x1101 Service Vspeed over 3kph confition response NRC22 in default session with  Functional addressing')
    @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
    @pytest.mark.parametrize('req,resp,resp2', ECUReset, ids=ids)
    def test_SID11_OverVspeed_Default_Send3E80_Fun(self, action, Driver,req,resp,resp2):
          iStep = 1
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 1, iStep, False)
          #设置车速大于3KM/H
          iStep = Driver['CAN'].setSignalValue('abs_sts_run1', 'abs_pm_veh_spd',80,iStep)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 0, iStep, False)

          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp, 0, iStep, False, 'UDSFun')

          iStep = Driver['CAN'].setSignalValue('abs_sts_run1', 'abs_pm_veh_spd',0,iStep)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp2, 0, iStep, False, 'UDSFun')

    ids = ids = ["Request {}".format(binascii.b2a_hex(bytearray(req), ' '))for req,resp,resp2 in ECUReset]
    @allure.title('Test NRC22 of 0x11 Service Vspeed over 3kph in Programming session with  Functional Address')
    @allure.description('Test 0x1101 Service Vspeed over 3kph confition response NRC22 in Programming session with  Functional addressing')
    @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
    @pytest.mark.parametrize('req,resp,resp2', ECUReset, ids=ids)
    def test_SID11_OverVspeed_Programming_Send3E80_Fun(self, action, Driver,req,resp,resp2):
          iStep = 1
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 2, iStep, False)
          #设置车速大于3KM/H
          iStep = Driver['CAN'].setSignalValue('abs_sts_run1', 'abs_pm_veh_spd',80,iStep)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 0, iStep, False)

          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp, 0, iStep, False, 'UDSFun')

          iStep = Driver['CAN'].setSignalValue('abs_sts_run1', 'abs_pm_veh_spd',0,iStep)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp2, 0, iStep, False, 'UDSFun')


    ids = ids = ["Request {}".format(binascii.b2a_hex(bytearray(req), ' '))for req,resp,resp2 in ECUReset]
    @allure.title('Test NRC22 of 0x11 Service Vspeed over 3kph in extended session with  Functional Address')
    @allure.description('Test 0x1101 Service Vspeed over 3kph confition response NRC22 in extended session with  Functional addressing')
    @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
    @pytest.mark.parametrize('req,resp,resp2', ECUReset, ids=ids)
    def test_SID11_OverVspeed_Extended_Send3E80_Fun(self, action, Driver,req,resp,resp2):
        iStep = 1
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 3, iStep, False)
        #设置车速大于3KM/H
        iStep = Driver['CAN'].setSignalValue('abs_sts_run1', 'abs_pm_veh_spd',80,iStep)
        time.sleep(1)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 0, iStep, False)
        time.sleep(1)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 0, iStep, False)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp, 0, iStep, False, 'UDSFun')
        #设置车速
        iStep = Driver['CAN'].setSignalValue('abs_sts_run1', 'abs_pm_veh_spd',0,iStep)
        time.sleep(0.5)
        iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp2, 0, iStep, False, 'UDSFun')